import request from '@/lib/request';

export function register (data) {
  return request({
    url: '/vue-admin-template/user/login',
    method: 'post',
    data
  });
}

/**
 * 注册新用户
 * @tips User
 * @tags [User]
 * @param {object} aDataBody 参数 [#/components/schemas/RegisterUserInput]
  */
export function api_POST_UsersRegister (aDataBody) {
  return request({
    baseURL: WEB_CONFIG.VUE_APP_SWAGGER_BASE,
    url: '/api/identity/users/register',
    method: 'post',
    data: aDataBody
  });
}

/**
 * 注册新用户发送手机验证码
 * @tips User
 * @tags [User]
 * @param {object} aDataBody 参数 [#/components/schemas/SendSmsCodeInput]
  */
export function api_POST_UsersRegisterSmsCode (aDataBody) {
  return request({
    baseURL: WEB_CONFIG.VUE_APP_SWAGGER_BASE,
    url: '/api/identity/users/register/sms-code',
    method: 'post',
    data: aDataBody
  });
}

/**
 * 修改注册用户密码
 * @tips User
 * @tags [User]
 * @param {object} aDataBody 参数 [#/components/schemas/RegisterUserInput]
  */
export function api_POST_UsersRegisterResetPassword (aDataBody) {
  return request({
    baseURL: WEB_CONFIG.VUE_APP_SWAGGER_BASE,
    url: '/api/identity/users/register/reset-password',
    method: 'post',
    data: aDataBody
  });
}

/* ********** GraphicVerify ********** */
/**
 * --
 * @tips GraphicVerify
 * @tags [GraphicVerify]
 * @param {object} aDataQuery 参数 [api_GET_GraphicVerifyQO]
  */
export function api_GET_GraphicVerify (aDataQuery) {
  return request({
    baseURL: WEB_CONFIG.VUE_APP_SWAGGER_BASE,
    url: '/api/graphicVerify',
    method: 'get',
    params: aDataQuery
  });
}

/* ********** GraphicVerify ********** */
/**
 * --
 * @tips GraphicVerify
 * @tags [GraphicVerify]
 * @param {object} aDataQuery 参数 [api_GET_CheckQO]
  */
export function api_GET_Check (aDataQuery) {
  return request({
    baseURL: WEB_CONFIG.VUE_APP_SWAGGER_BASE,
    url: '/api/graphicVerify/Check',
    method: 'get',
    params: aDataQuery
  });
}

/* ********** 微信第三方 ********** */
/**
 * 微信绑定 发送手机验证码
 * @param {object} aDataQuery 参数 [api_GET_CheckQO]
  */
export function api_POST_IdentityUserWechatSmsCode (aDataQuery) {
  return request({
    baseURL: WEB_CONFIG.VUE_APP_SWAGGER_BASE,
    url: '/api/identity/users/wechat/sms-code',
    method: 'post',
    data: aDataQuery
  });
}

/**
 * 微信绑定 绑定微信
 * @param {object} aDataQuery 参数 [api_GET_CheckQO]
  */
export function api_POST_IdentityUserWechatBind (aDataQuery) {
  return request({
    baseURL: WEB_CONFIG.VUE_APP_SWAGGER_BASE,
    url: '/api/identity/users/wechat/bind',
    method: 'post',
    data: aDataQuery
  });
}
